Part Number Hot Search : 
4C256 BTA06 FS450 T114042 74HC4024 1415514C BUL382 HVC385B
Product Description
Full Text Search
 

To Download BT44X Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  embedded wireless solutions support center: http://ews - support.lairdtech.com www.lairdtech.com/bluetooth 1 americas: +1 - 800 - 492 - 2320 europe : +44 - 1628 - 858 - 940 hong kong: +852 2923 0610 bt m44x s eries hid host application note v1. 1 i ntroduction this document describes the process for configuring two btm44x modules to establish a connection using the hid (hum an interface device) protocol. one module act s as a n hid h ost and the other act s as a n hid d evice. there are four variants of the btm44x module which interface with a host via uart and one of two logical protocols. the btm44 0 and btm44 1 modules are configured by factory default to use the multipoint (mp) protocol. to send mp protocol data to the module, the mpbthost utility ( available from laird ) can be used. if using a btm44 2 or btm44 3 , the module default s into at protocol mode. if usin g these variants, r efer to the btm44x user guide to switch to the mp protocol before continuing. this application note is written based on the assumption that you have access to two btm44x development kits, a windows pc (xp or higher), and the mpbthost uti lity software available from laird. to configure the modules via a non - windows device (such as a microcontroller), refer to the multipoint protocol section of the btm44x user guide for packet descriptions for each command used in this document. c onnectin g to the m odules to connect the modules, follow these steps: connect each development board to an availa ble usb port on your windows pc. once the drivers are installed, two new com ports should be available on your pc. when the two modules are successfull y connected, load two instances of the mpbthost utility . r ead and accept the li c en s e. select the appropriate com ports for the connected modules, ensure the default values of 115200,n,8,1 are selected , and click ok to proceed. mpbthost then reset s the mod ules and display the comms log window ( figure 1 ). figure 1 : reset module wizard either wait for approximately ten seconds or click go to bypass the wait. on reset , the utility identifies the module and its bluetooth address and display s the information in the bottom right of the software if the module is powered up and connected ( figure 2 ).
bt m44x series hid host application note embedded wireless solutions support center: http://ews - support.lairdtech.com www.lairdtech.com/bluetooth 2 americas: +1 - 800 - 492 - 2320 europe : +44 - 1628 - 858 - 940 hong kong: +852 2923 0610 figure 2 : mpbthost utility log window the log window ( figure 2 ) display s any serial commands and data sent between the pc and module. it should display data sent as the module resets. note the four virtual leds which show t he status of the serial lines. if operating correctly, cts and dsr should be green and dcd and ri should be red. ensure that data is being displayed and the status leds are correct before proceeding. the following is the color - coding structure of the utilitys messages: ? red C command packets from the host to the module ? blue C responses to the commands from the host ? green C asynchronous event messages from the module to the host. ? grey C information added by the utility and are not part of the mp protocol. for command packets (re d lines), note an extra spacing after the fourth character. this space highlight s the following fact s: ? the first four bytes of a multipoint command packet make up the header ? the third byte corresponds to the cmd_id as described in the user guide ? all bytes following the fourth byte constitute data fields as defined for that particular command. for responses (blue lines), note the extr a spacing after the fifth byte. this space highlights the following facts: ? the first five bytes make up the header ? the fifth byte, as described in the user guide, is the status b yte (00 signifies mpstatus_ok) ? everything after the fifth byte constitutes data as defined for each response in the user guide . asynchronous event messages (green lines) consist of a 4 byte hea der and data as defined in the user guide . the third byte of the message is the evt_id. to establish a hid device to host connection , execute the following procedure: ? change the server profile to hid ? change one module to act as a hid host ? reset the modules to enable the new profiles ? make an inquiry from one module and the devices ? send data from the hid device and ensure it is received by the hid host ? drop the connection virtual leds
bt m44x series hid host application note embedded wireless solutions support center: http://ews - support.lairdtech.com www.lairdtech.com/bluetooth 3 americas: +1 - 800 - 492 - 2320 europe : +44 - 1628 - 858 - 940 hong kong: +852 2923 0610 c hang ing the s erver p rofile configuration values in the module are stored in s regist ers, each of which have an associated numerical value. a description of all available s registers is available in the btm44x user guide . s register 3 sets the b luetooth profile that is available whe n a connection is established. the default value of 1 enables the serial port profile (spp). this register must be set to 2 to enable the hid profile. to change the server profile, follow these steps: to select the c ommand to write to an s register, click the drop - down menu and select sreg write ( figure 3 ). the command fields are populated with the appropriate values for the mp protocol command . the values rr and vvvvvvvv must be changed to the s re gister and value respectively. change rr to 0 3 and vvvvvvvv to 00000002 . ensure that the values include the correct number of leading zeroes or the packet size will be incorrect and will not be accepted by the module. figure 3 : sreg write click t x to send the command. e nsure the module responds with mpstat us_ok displayed in blue. if no data is sent or an mpstatus_invalid_regvalue response is received, check the values and lengths and try again. the s register must then be stored to non - volatile memory in order to retain its value on reset. select sreg st ore from the drop - down menu and click tx to store the register. ensure the response is mpstatus_ok. repeat the write and store commands for the second module. to set one module as a hid host , follow these steps: set s register 39 (0x27) to - 1 (0xffffffff) by replacing rr with 27 and vvvvvvvv with ffffffff in the sreg write command (because the mp protocol accepts hexadecimal values). c lick tx . res end the sreg store command to store the configuration. the other device w ill act as the hid device. to enable the new profiles , follow these steps: c lick the reset button on both utility windows to reset the modules and wait for an evt_st atus event before continuing. to ensure that the s registers have been successfully stored , use the s reg read command, replacing rr with the register value and check to ensure that the returned value in the last section of the res ponse matches the correct value ( figure 4 ). figure 4 : evt_status event
bt m44x series hid host application note embedded wireless solutions support center: http://ews - support.lairdtech.com www.lairdtech.com/bluetooth 4 americas: +1 - 800 - 492 - 2320 europe : +44 - 1628 - 858 - 940 hong kong: +852 2923 0610 m ak ing an i nquiry to make an inquiry, follow these steps: in the mpbthost window for the hid device, select inquir y req from the drop - down menu . the cmd and data textboxes are updated as sho wn ( figure 5 ). figure 5 : inquiry req the inquiry request command has a three byte data field, corresponding to maxreponses, timeou t_secs , and flags respectively. leave the default values and click t x . the command completes after eight seconds or when five devices are discovered. d iscovered d evices are sent by the module followed by an mpstatus_ok when the command completes and is ready to receive more commands ( figure 6 ). figure 6 : cmd_inquiry_req in each green event packet , the six bytes after the double spacing (e.g 0016a4fef072) is the bluetooth address. ensure that you see a line corresponding to the other modules. if not, try the inquiry again. since inquiry has a random element to it, you will e ventually be able to pick up a response. you can increase the probability of getting a response from your other module by increas ing the maxresponses and t imeout_sec data bytes of the command. p air ing and c onnect ing d evices to pair and connect devices, follow these steps: select pair initiate from the drop - down menu on th e mpbthost for the hid device. chang e the values in the data field: ? set tt to 10 to represent 16 seconds ( tt corresponds to the timeout value in hex in seconds). ? replace the next six by tes with the b luetooth address of the hid h ost module . the other val ues can remain as default. ? c lick t x . after a few seconds , the h ost and d evice modules should both send status events to indicate their pairing, and the d evice initiating the connect should send a rsp_pair_initiate (mpstatus_ok) response. the dcd indicator should turn green to show that a connection is established.
bt m44x series hid host application note embedded wireless solutions support center: http://ews - support.lairdtech.com www.lairdtech.com/bluetooth 5 americas: +1 - 800 - 492 - 2320 europe : +44 - 1628 - 858 - 940 hong kong: +852 2923 0610 to create a n hid connection , select connection make from the drop - down menu on the hid device module. this updates the command fields ( figure 7 ). figure 7 : updated command fields in the data field, the first value ab is a host handle that is echoed back by the module. change the next value to the bluetooth address of the hid host module. change the third value (the uuid or universal unique id of the profile to connect to) to 1124 for a n hid profile. c lick tx to send. after a few seconds, a connection should be established and event messages should be sent by the h ost and d evice modules to confirm the connection. a hid connection should now be established between the two modules with the device behaving as a 104 - key keyboard d evice to the h ost. s ending d ata b etween d evices when the d evice is configured as a hid keyboard, the module can send data in one of two methods. in canned mode the hid device takes ascii characters via the mp p rotocol and sends them to the hid host as a number of keystroke events. for each character to be sent , the d evice send s one key - down event to the h ost followed by one key - up event. for the five character string laird , ten events are sent. in non - canned mod e the hid host or device can send packetized data without being parsed by the module. to send key press events using canned mode, strings are sent as data in the mp protocol, not requiring a command , but sent using channel 20 to determine the type of data received. to send key press events from the device to host , follow these steps: in the mpbthost utility , change the chn (channel) 00 value to 20 in the chn field. r eplace the values in the d ata field with a short string (such as xyz in figure 8 ) . note that the utility can parse hex values, so use non hex charac ters (0 - 9, a - f) while testing. figure 8 : change values to send data click tx data to send a data string to the h ost. the h ost should show two events for every character sent : the first containing a value in the data field to represent a key - down event for each character and the second containing all zeroes for key - up. up to 60 characters can be sen t in a single packet. if this is not received by the h ost module, disconnect the modules and re - establish the connection. note: make sure to change the channel value back to 00 before sending additional commands.
bt m44x series hid host application note embedded wireless solutions support center: http://ews - support.lairdtech.com www.lairdtech.com/bluetooth 6 americas: +1 - 800 - 492 - 2320 europe : +44 - 1628 - 858 - 940 hong kong: +852 2923 0610 to send data packets using non - canned mode, bytes are sent without requiring a command but sent using the channel indicated when a connection is established. channel 90 is used when sending data from the device, and a0 when sending data from the host. to send data packets between the modules, follow these steps: 1. in the mpbthost utility, change the chn (channel) value to 90 if sending from the host, or a0 from the device. 2. replace the values in the data field with the data to be sent as either hex values or character strings. 3. click tx data to send the data to the receiving module. the module should show a packet received event containing the channel from which the data was received, and the data sent. d ropping the c onnection the connection can be dropped fr om either device. to drop the connection, follow these steps: select connection drop from the mpbthost utility dropdown menu . r eplace cc in the data field with t he channel to be disconnected. this value is 20 on the d evice and 90 on the h ost. the h ost and device should both send evt_disconnect events to indicate the dropped connection. if no response is received, ensure that the chn field is returned to value 00 after sending data. r evision h istory revision date description approved by 1.0 21 oct 2014 initial release jonathan kaye 1.1 28 apr 2015 updated links sue white


▲Up To Search▲   

 
Price & Availability of BT44X

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X